package com.twt.recruit.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeUtil {

    public static final String Y_M_D_H_M_S = "yyyy-MM-dd HH:mm:ss";


    public static final String Y_M_D_H_M = "yyyy-MM-dd HH:mm";

    public static final String Y_M_D = "yyyy-MM-dd";


    public static String timestampToDate(long timestamp, String config){
        SimpleDateFormat dateFormat = new SimpleDateFormat(config);
        Date date = new Date(timestamp);
        return dateFormat.format(date);
    }
}
